package com.sunshine.lnuplus.viewModel

import android.app.Application
import android.content.Context
import com.sunshine.lnuplus.base.BaseViewModel

class MainViewModel(application: Application) : BaseViewModel(application) {

    private val appSp = application.getSharedPreferences("com.sunshine.lnuplus_preferences", Context.MODE_PRIVATE)
    var firstStart = true
    var currentItem = 0

    fun checkUpdate(): Boolean {
        return appSp.getBoolean("show_update", true)
    }

    fun getDefaultScreen(): String {
        return appSp.getString("default_screen", "0")!!
    }

    fun isAutoToCountDown(): Boolean {
        return appSp.getBoolean("auto_to_countdown", true)
    }

    fun getBackgroundMohu(): Int {
        return appSp.getInt("background_mohu", 0)
    }

    fun getNavigationChenJin(): Boolean {
        return appSp.getBoolean("navigation", false)
    }

}